package com.only4play.practice.invoice.core.domainservice.pipeline.context;

import com.only4play.practice.invoice.core.domainservice.model.exchange.ExchangeInvoiceModel;
import com.only4play.practice.invoice.core.domainservice.model.exchange.ExchangeInvoiceResultModel;
import com.only4play.practice.invoice.elastic.OrderReceiptDocument;
import com.only4play.practice.ordercommon.constants.BizEnum;
import com.only4play.practice.ordercommon.filters.selector.FilterSelector;
import com.only4play.practice.ordercommon.model.AbstractOrderContext;
import io.vavr.Tuple2;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 换票上下文
 */
@Data
public class ExchangeInvoiceContext extends AbstractOrderContext {


  private ExchangeInvoiceModel exchangeInvoiceModel;


  private ExchangeInvoiceResultModel resultModel;

  /**
   * 存放拆票结果
   */

  private List<Tuple2<String, Map<Integer, List<OrderReceiptDocument>>>> splitResult;

  public ExchangeInvoiceContext(BizEnum bizEnum,
                                FilterSelector selector) {
    super(bizEnum, selector);
  }

  @Override
  public boolean continueChain() {
    return true;
  }
}
